<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?>
<div class="containerUnder">
	<div class="collectionLeft">
		<div class="mainTitle"><?php echo $VM_LANG->_('HA_SHOPPING_CART'); ?></div>
		<ul class="cartCategory">
			<?php 
				for($i=0;$i<count($category);$i++){
					if($category_id != $category[$i]->category_id ){
						echo "<li><a href=\"index.php?option=com_virtuemart&page=shop.list&category_id=".$category[$i]->category_id."&Itemid=".$Itemid."\" class=\"cartCategory\">".$category[$i]->category_name."</a></li>";
					}else{
						echo "<li><a id=\"catSelect\" href=\"index.php?option=com_virtuemart&page=shop.list&category_id=".$category[$i]->category_id."\" class=\"cartCategory\">".$category[$i]->category_name."</a></li>";
					}
				}
			?>
		</ul>
	</div>
	<div class="collectionRight">
		<div class="collectionTopLine"></div>
        <div class="clr"></div>
		<?php 
			for($i=0;$i<count($list);$i++){
				?>
				<div class="collectionItem">
                	<a href="index.php?option=com_virtuemart&page=shop.detail&category_id=<?php echo $category_id; ?>&id=<?php echo $list[$i]->product_id;?>&Itemid=<?php echo $Itemid; ?>"><img width="210" height="175" src="<?php echo JURI::base(); ?>components/com_virtuemart/shop_image/product/<?php echo $list[$i]->product_thumb_image; ?>" alt=""/><span><?php echo $list[$i]->product_s_desc; ?></span></a>
                    <div class="collectionItemLeft"><?php echo $list[$i]->product_name ?></div>
                    <div class="collectionItemRight">DKK <?php
						$db =& JFactory::getDBO();
						$q = "SELECT * FROM #__vm_product_price WHERE `product_id` = ".$list[$i]->product_id;
						$db->setQuery($q);
						$product_price = $db->loadObjectList();
						//var_dump($db);
						echo str_replace(",00",",-",number_format($product_price[0]->product_price,2,",",".")); 
					
					?></div>
                    <div class="clr"></div>
                </div>
				<?php
			}
		?>
	</div>
	<div class="clr"></div>
	<div class="next-page">
		<ul>
			<?php 
				for($i=1;$i <= $totalpage; $i++){
					$temp = ($i-$page)*$limit + $limitstart;
					if($i == $page){
						echo "<li id=\"page-select\"><a href=\"index.php?option=com_virtuemart&category_id=$category_id&limit=$limit&limitstart=$temp\">$i</a></li>";
					}else{
						echo "<li><a href=\"index.php?option=com_virtuemart&category_id=$category_id&limit=$limit&limitstart=$temp\">$i</a></li>";
					}
				}
			?>
		</ul>
	</div>
	<div class="clr"></div>
</div>